home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_300
/
329_02
/
xcxref.doc
< prev
next >
Wrap
Text File
|
1990-06-10
|
12KB
|
246 lines
XCXREF - A 'C' Concordance Utility
========================================
'XCXREF' is a cross-reference utility for 'C' programs. It
is derived from another program named 'XC' developed as indicat-
ed below.
Option flags support the following features:
- Routing of list output to any combination of disk, printer
and video.
- Cross-referencing of reserved words.
- Processing of nested include files.
- Proper processing of nested comments.
- Generation of program listing only.
- Variable output page width.
- Indirect and direct file name input.
- Alternate path direction.
Usage: xcxref <filename> ... <flag(s)>
All files selected are cross-referenced together. The variable
listing will show every occurance, for example, of 'var' in
every file.
Flags: -e = Write program data to log file.
-g = Ignore missing files.
-i = Enable #include processing.
-l = Generate listing only - no xref.
-o <outfile> = Write output to named file.
-p = Write output to line printer LPT1.
-r = Cross-reference 'C' reserved words.
-s = Write output to video screen.
-w width = Width of output page; default = 78
max = 150.
Flags MUST FOLLOW all input file names.
Separate any flag parameters from the flag by at least
one space.
Examples:
xcxref file1.c
xcxref main.c file1.c file2.c file3.c -o xref.lst -w 120
xcxref @xfile file3.c file4.c -o xref.lst -w 120
xfile contains... file1.c file2.c
History:
XC - version 1.0 January, 1982
Copyright (c) 1982 by Philip N. Hisley
Philip N. Hisley
548H Jamestown Court
Edgewood, Maryland 21040
(301) 679-4606
Released for non-commercial distribution only
Converted to IBM/PC CI/C86 by David N. Smith,
May/June 1983 with enhancements and Lattice compiler
support in December 1983.
David N. Smith
44 Ole Musket Lane
Danbury, CT 06810
(203) 748-5934
CompuServe: 73145,153
Changes Copyright (c) 1983 by David N. Smith
Permission granted to copy for non-commercial purposes.
PC Enhancements include:
1) Nested #INCLUDE statements
2) Single spaced cross-reference list
3) Removal of tabbing on output device
(Since many printers don't support it)
4) #INCLUDE statements with both "--" and <-->
syntax and with a full fileid in the quotes.
(Paths are not supported.)
5) Multiple input filenames on command line.
The current PC version only supports Lattice.
Conversion to others should be relatively easy but see
the compile time variable "Lattice" for compiler specific
sections.
XCXREF - Version 1.0; May, 1990
Martin D. Winnick
5301 El Arbol Drive
Carlsbad, CA 92008
(619) 438-8154
CompuServe: 71665,456
Changes Copyright (c) 1990 by Martin D. Winnick.
Permission granted to copy for non-commercial purposes.
The following is a brief summary of the XCXREF changes:
Converted to IBM/PC Microsoft QuickC. Program renamed
to 'XCXREF' due to extensive code and functional
changes.
The source code has been reformatted into a more read-
able style, variable names have been changed to a
meaningful word rather than a coded acronym and the
program modified (I hope) to conform to the new ANSI
standards. Additional comments have been added where I
felt they were needed. Dead code has been removed,
including all conditional compilation code.
The number of referenced symbols raised to 5000 from 749.
Although this is still a memory bounded program for the
cross reference data. I have tested it on an IBM PC/XT,
640KB, CGA, 30MB hard disk. The largest cross reference
I have tried included 15+ programs consisting of 30,000
lines of code, producing 350+ output pages with 2000+
referenced symbols.
The accompanying xc.exe is compiled as a 'compact'
model. This or any other large data model is necessary
to accomodate the increased number of symbol references.
Command line Flags usage:
-e = Write program data to log file
Key program variable data will be written to a log
file, XCXREF.LOG, in the event of either a recoverable
error condition or abnormal error program exit. Any
partial cross reference created to the abnormal exit
is retained. Upon a successful program completion the
ending values of these program variables will also be
written to the log file.
-g = Ignore missing files
If this flag is not entered any file selected and not
found by the program will cause termination of the
process. If it is entered the not-found condition will
be ignored, a message will be displayed, and processing
will continue with the next file.
-i = Enable #include processing
If this flag is not entered all #include files will be
ignored, a message will be displayed, and processing
will continue.
-l = Generate listing only - no xref
The program(s) will be listed to the output types
specified. No cross reference will be created.
-o <outfile> = Write output to named file
All program output will be written to the named disk
file. This may be in addition to other types of pro-
gram output such as the printer and video screen. Do
not enclose the file name in the '<>' brackets.
-p = Write output to line printer LPT1
The -p command line flag will direct the program and
crossreference listing to the line printer, LPT1. This
is in addition to any other directed output. Printing
is accomplished by direct calls to the operating system
BIOS. This has the (undesirable ?) side effect of
tying this version to PCs using MS/PC-DOS.